﻿var serverPath = "http://localhost:44321/";
//初始化模态框配置
$('#myModal').modal({
    keyboard: false,
    backdrop: "static",
    show: false
})

//模态框隐藏时，取消提交事件
$('#myModal').on('hidden', function () {
    $("#btnSubmit").off("click");
    onoff = 1;
})

function DataTableInit(el, url, method, colunm) {

    var a = $(el).DataTable({
        //使用ajax请求
        "lengthMenu": [[8, 15, 20, -1], ["八", "十", "十五", "全部"]],
        "pagingType": "numbers",
        "language": {
            "info": "当前第 _START_ 条到第 _END_ 条，共 _TOTAL_ 条",
            "lengthMenu": "每页显示 _MENU_ 条",
        },
        "ajax": {
            url: url,
            type: method
        },
        //配置列顺序
        "columns": colunm
    });
    return a;
}
